{% extends "base_fullpage.html" %}

{% block subtitle %}Storage unit {{ storage_unit.name }} {% endblock %}

{% block content %}

<h2>Storage unit {{ storage_unit.name }}</h2>

<dl>
  <dt>Description</dt> <dd>{{ storage_unit.description }}</dd>

  <dt>Location</dt> <dd>{{ storage_unit.location }}</dd>

  {% if storage_unit.slots %}
  <dt>Slots</dt>
  <dl>
    <ul>
    {% for slot in storage_unit.slots %}
      <li>{{ slot }}</li>
    {% endfor %}
    </ul>
  </dl>
  {% endif %}
</dl>

<a href="/storage_unit/update?key={{ storage_unit.key.urlsafe() }}">Edit</a>

<h2>Containers</h2>
{% for slot in storage_unit.slots + [""] %}
<h3>{% if slot != "" %}{{ slot }}{% else %}Other{% endif %}</h3>
{% if containers.get(slot, None) %}
<ul>
{% for c in containers.get(slot, None) %}
  <li><a href="/container/view?key={{ c.key.urlsafe() }}">{{ c.name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}

{% endblock %}
